// pages/test/index.js
Page({
  /**
   * 页面的初始数据
   */
  data: {},
  onShow() {
    const pageRoutes = getCurrentPages();
    console.log("测试页面", pageRoutes);

    const secondRoute = pageRoutes[1];
    secondRoute.onShow = () => {
      console.log("我被重写了......");
    };

    // setTimeout(() => {
    //   const firstRoute = pageRoutes[0];
    //   wx.switchTab({
    //     url: "/" + firstRoute.route,
    //   });
    // }, 3000);
  },
});
